/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.iqtitles.explorer;


import java.util.List;
import javax.swing.Action;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.util.NbBundle;
import static idea.iqtitles.explorer.Bundle.*;
import org.openide.util.Utilities;


/**
 * Sets up the Root Node for the OutlineView.
 *
 * @author rejun001
 */
public class IQuestionTitleRootNode extends AbstractNode
{

    /**
     * Constructor. Associates root with children.
     *
     * @param children
     */
    @NbBundle.Messages( "CTRL_RootName=question_title_link_view" )
    public IQuestionTitleRootNode( Children children )
    {
        super( children );
        setDisplayName( CTRL_RootName() );
    }


    /**
     * looks up and gets the actions for the QustionTitles (likely only the Properties
     * window).
     *
     * @param context
     * @return array of Actions
     */
    @Override
    public Action[] getActions( boolean context )
    {
        List<? extends Action> actionsForQuestionTitles = 
                Utilities.actionsForPath( "Actions/QuestionTitles" );
        return actionsForQuestionTitles.toArray( 
                new Action[ actionsForQuestionTitles.size() ] );
    }

}
